{__NOLAYOUT__}
<layout name="layoutPC" />

<div class="container" ng-controller="missionIndexController">
  <input type="hidden" id="missionId" value="<{$mission_id}>">
  <div class="row" style="margin-top:40px;">
    <div class="col-sm-8">
      <h2 style="margin-bottom:20px;width: 90%;">{{ mission.mission_name }}</h2>
      <a id="modify-mission" href="<{:U('Manage/detailPC')}>/mission/<{$mission_id}>" ng-show="status==1">修改</a>
      <span class="dateline">{{ getTimePast(mission.publish_time) }}</span>
      <div class="row" style="margin-top: 15px;">
        <div class="col-sm-4 padding-0" id="price">
          <span class="price-tag">{{ mission.salary || '面谈' }}</span>
        </div>
      </div>
      <div class="information-display row">
        <div class="col-sm-4 title title-left" style="font-size: 20px;">
            岗位需求
        </div>
        <div class="col-sm-8 content" style="font-size: 20px;">
            {{ mission.jobs }}
        </div>
      </div>
      <div class="information-display row">
        <div class="col-sm-4 title title-left" style="font-size: 20px;">
            工作时限
        </div>
        <div class="col-sm-8 content" style="font-size: 20px;">
            {{ mission.durationMeaning }}
        </div>
      </div>
      <div class="information-display row">
        <div class="col-sm-4 title title-left" style="font-size: 20px;">
            工作地点
        </div>
        <div class="col-sm-8 content" style="font-size: 20px;">
            {{ mission.location }}
        </div>
      </div>
      <div class="information-display row">
        <div class="col-sm-4 title title-left" style="font-size: 20px;">
            详细描述
        </div>
        <div class="col-sm-8 content mission-desc" style="font-size:20px">
            {{ mission.description }}
        </div>
      </div>
      <div class="row" ng-switch="status">
        <button ng-switch-when="1" class="btn-blue-line btn-lg btn-block" style="width:40%;margin:0 auto;" data-toggle="modal" data-target="#finishOptModal" type="button">结束任务</button>
      </div>
    </div>
    <div class="col-sm-4" id="publisher">
      <h3>要了的乙方</h3>
      <div class="trust-list">
        <div class="trust-member">
          <a ng-repeat="follow in userReceived" ng-click="getReceiverModal($index)">
            <img src="__UPLOAD__/{{ follow.image_url }}">
            <br>
            <p style="text-align:center;">{{ follow.user_name }}</p>
          </a>
        </div>
      </div>
      <h3>申请的乙方</h3>
      <div class="trust-list">
        <div class="trust-member">
          <a ng-repeat="follow in userFollow" ng-click="getFollowerModal($index)">
            <img rc="__UPLOAD__/{{ follow.image_url }}">
            <br>
            <p style="text-align:center;">{{ follow.user_name }}</p>
          </a>
        </div>
      </div>
    </div>

      <div class="modal fade" id="followerModal" tabindex="-1" role="dialog" aria-labelledby="followerModalLabel" aria-hidden="true">
          <div class="modal-dialog">
              <div class="modal-content">
                  <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                      <div class="row modal-title" id="followerModalLabel">
                          <div class="col-xs-2 padding-0">
                              <img ng-src="__PUBLIC__/static/mobile/img/avatar.png" width="50em">
                          </div>
                          <div class="col-xs-7 col-profile-head">
                              <h4>{{ follower.user_name }}</h4>
                              <span class="tag-level-first">甲.V{{ follower.level_j }}</span>
                              <span class="tag-level-second">乙.V{{ follower.level_y }}</span>
                          </div>
                          <div class="col-xs-2 padding-0 text-center" ng-switch="follower.hasFavored">
                              <span class="icon-fav" ng-switch-when="1" ng-click="favUser(0)">收藏</span>
                              <span class="icon-fav-del" ng-switch-when="2" ng-click="delFavUser(0)">取消收藏</span>
                          </div>
                      </div>
                  </div>
                  <div class="modal-body">
                      <h6 class="text-tips">留言</h6>
                      <p>
                          {{ follower.message }}
                      </p>
                  </div>
                  <div class="modal-footer btn-group-card">
                      <button type="button" class="btn" ng-click="select()">就要Ta了</button>
                      <a role="button" href="<{:U('FetcherInfo/indexPC')}>?user_id={{ follower.user_id }}" class="btn">查看资料</a>
                  </div>
              </div>
          </div>
      </div>

      <div class="modal fade" id="finishOptModal" tabindex="-1" role="dialog" aria-labelledby="finishOptModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="btn-group-card btn-vertical btn-single" style="border-radius: 6px;">
                    <div style="overflow:hidden;">
                        <button type="button" class="btn" data-toggle="modal" data-target="#finishModal">谢谢活控，已找到人才</button>
                    </div>
                    <div style="overflow:hidden;">
                        <button type="button" class="btn" ng-click="finish(0)">没找到人才，结束活儿</button>
                    </div>
                </div>
            </div>
        </div>
      </div>

    <div class="modal fade" id="finishModal" tabindex="-1" role="dialog" aria-labelledby="finishModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="row modal-title" id="finishModalLabel">
                        <div ng-repeat="receive in userReceived" rater-filter>
                            <div class="col-xs-2 padding-0">
                                <img ng-src="__UPLOAD__/{{ receiver.image_url }}" width="50px" height="50px">
                            </div>
                            <div class="col-xs-8 col-profile-head">
                                <h4>{{ receive.user_name }}</h4>
                                <span class="tag-level-first">甲.V{{ receive.level_j }}</span>
                                <span class="tag-level-second">乙.V{{ receive.level_y }}</span>
                            </div>
                            <div class="col-xs-2 padding-0 text-center" ng-switch="receive.collect_status" ng-init="receive.hasFavored = receive.collect_status">
                                <span class="icon-fav" ng-switch-when="1" ng-click="favUser(1)">收藏</span>
                                <span class="icon-fav-del" ng-switch-when="2" ng-click="delFavUser(1)">取消收藏</span>
                            </div>
                            <div class="row">
                                <div class="col-xs-3">
                                    <span class="text-tips">满意度</span>
                                </div>
                                <div class="col-xs-9 padding-0">
                                    <p class="rank"></p>
                                    <input name="rank" class="rankNumber" type="hidden" ng-model="receive.evaluate"/>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-offset-3 col-xs-9 padding-0 col-checkbox">
                                    <!-- <div class="checkbox">
                                        <label>
                                            <input type="checkbox" ng-init="receive.is_selected = false" ng-model="receive.is_selected" />不满意，不要Ta
                                        </label>
                                    </div> -->
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-xs-12">
                                <p class="text-tips">对乙方进行匿名评价，暂仅作为后台系统数据参考，请根据真实满意度进行评价。</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer btn-group-card btn-single">
                    <button type="button" class="btn" ng-click="finish(1)">完成</button>
                </div>
            </div>
        </div>
    </div>

      <!-- Modal Receiver -->
      <div class="modal fade" id="receiverModal" tabindex="-1" role="dialog" aria-labelledby="receiverModalLabel" aria-hidden="true">
          <div class="modal-dialog">
              <div class="modal-content">
                  <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                      <div class="row modal-title" id="receiverModalLabel">
                          <div class="col-xs-2 padding-0">
                              <img ng-src="__PUBLIC__/static/mobile/img/avatar.png" width="50em">
                          </div>
                          <div class="col-xs-7 col-profile-head">
                              <h4>{{ receiver.user_name }}</h4>
                              <span class="tag-level-first">甲.V{{ receiver.level_j }}</span>
                              <span class="tag-level-second">乙.V{{ receiver.level_y }}</span>
                          </div>
                          <div class="col-xs-2 padding-0 text-center" ng-switch="receiver.hasFavored">
                              <span class="icon-fav" ng-switch-when="1" ng-click="favUser(1)">收藏</span>
                              <span class="icon-fav-del" ng-switch-when="2" ng-click="delFavUser(1)">取消收藏</span>
                          </div>
                      </div>
                  </div>
                  <!--<div class="modal-body" ng-switch="receiver.hasEvaluated">
                      <p id="rank" ng-show="receiver.hasEvaluated == 0"><span class="text-tips">满意度</span></p>
                      <div ng-switch-when="0">
                          <h6 class="text-tips">对乙方进行匿名评价，暂仅作为后台系统数据参考，请根据真实满意度进行评价。</h6>
                          <input name="rank" id="rankNumber" type="hidden" ng-model="rank"/>
                      </div>
                      <div ng-switch-when="1">
                          <h6 class="text-tips">您已对Ta进行过评价。</h6>
                      </div>
                  </div>-->
                  <div class="modal-footer btn-group-card btn-single">
                      <!--<button type="button" class="btn" ng-click="evaluate(receiver)">完成评价</button>-->
                      <button type="button" class="btn" ng-click="refuse()">不满意，不要Ta</button>
                  </div>
              </div>
          </div>
      </div>
  </div>
</div>
<link href="__PUBLIC__/static/pc/css/rater.css" rel="stylesheet" type="text/css"/>
<script src="__PUBLIC__/static/pc/js/jquery.rater.js"></script>